import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';

/// 登录状态
@immutable
abstract class LoginState extends Equatable {
  const LoginState();

  @override
  List<Object> get props => [];
}
  
/// 登录初始化状态
class LoginInitial extends LoginState {}

/// 正在登录中状态
class LoginLoading extends LoginState {}

/// 登录失败状态
class LoginFailure extends LoginState {
  final String error;

  const LoginFailure({@required this.error});

  @override
  List<Object> get props => [error];

  @override
  String toString() => "LoginFailure { error: $error }";
}